package com.hmall.client;

import com.hmall.common.dto.PageDTO;
import com.hmall.common.pojo.Item;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: ahcfl
 * @Date: 2021年07月29日 15:03
 * @Description:
 */
@FeignClient("itemservice")
public interface ItemClient {

    @GetMapping(value = "/item/list", name = "分页查询商品")
    PageDTO<Item> queryByPage(@RequestParam("page") Integer page, @RequestParam("size") Integer size);

    @GetMapping(value = "/item/{id}", name = "根据id查询商品")
    Item queryItemById(@PathVariable("id") Long id);

    @PutMapping(value = "/item", name = "修改商品")
    ResponseEntity updateItem(@RequestBody Item item);

}
